package com.example.gzysmartcity.repository.local;

import com.example.gzysmartcity.App;
import com.example.gzysmartcity.repository.model.SellCar;

import java.util.List;

public class SellCarDB {
    //清除缓存
    public static List<SellCar> loadAll() {
        //清除缓存
        App.getSellCarDao().detachAll();
        return App.getSellCarDao().loadAll();
    }

    public static void inserts(SellCar sellCar) {
        App.getSellCarDao().insert(sellCar);
    }

    public static SellCar getById(Long id) {
        return App.getSellCarDao().load(id);
    }

    public static void del(SellCar sellCar) {
        App.getSellCarDao().delete(sellCar);
    }

    public static void update(SellCar sellCar) {
        App.getSellCarDao().update(sellCar);
    }
}
